import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Root',
      redirect:'/login'
    },
    {
      path: "/login",
    name: "login",
  
    component: () => import("@/views/login")
    },
    {
      path: "/layout",
      name: "layout",
      component: () => import("@/views/layout"),
      children:[
        {
          path: "/layout",
          redirect:'/home',
          meta:{hiddren:true},
        },{
          path: "/layout/home",
          name: "home",
          component: () => import("@/views/layout/home/index"),
        },{
          path: "/layout/car",
          name: "car",
          component: () => import("@/views/layout/car/index"),
        },{
          path: "/layout/my",
          name: "my",
          component: () => import("@/views/layout/my/index"),
        },{
          path: "/layout/list",
          name: "list",
          component: () => import("@/views/layout/list/index"),
        }
      ]
    }
  ]
})
